Next | Top | Index

Full Table of Contents


Contents
About This Guide
What This Guide Contains
What You Should Know Before Reading This Guide
Suggestions for Further Reading
Conventions Used in This Guide
1. - About the MIPSpro Compiler System
2. - Using the MIPSpro Compiler System
Selecting a Compiler
Using Command-Line Options
Setting an Environment Variable
Object File Format and Dynamic Linking
Executable and Linking Format
Dynamic Shared Objects
Position-Independent Code
Source File Considerations
Source File Naming Conventions
Header Files
Specifying a Header File
Creating a Header File for Multiple Languages
Using Precompiled Headers in C and C++
About Precompiled Headers
Automatic Precompiled Header Processing
Other Ways to Control Precompiled Headers
PCH Performance Issues
Compiler Drivers
Default Behavior for Compiler Drivers
General Options for Compiler Drivers
Linking
Invoking the Linker Manually
Linker Syntax
Linker Example
Linking Assembly Language Programs
Linking Libraries
Specifying Libraries and DSOs
Examples of Linking DSOs
Linking to Previously Built Dynamic Shared Objects
Linking Multilanguage Programs
Finding an Unresolved Symbol With ld
Debugging
Getting Information About Object Files
Disassembling Object Files with dis
dis Syntax
dis Options
Listing Parts of DWARF Object Files With dwarfdump
dwarfdump Syntax
dwarfdump Options
Listing Parts of ELF Object Files and Libraries with elfdump
elfdump Syntax
elfump Options
Determining File Type with file
file Syntax
file Example
Listing Symbol Table Information: nm
nm Syntax
nm Symbol Table Options
nm Example of Obtaining a Symbol Table Listing
Determining Section Sizes with size
size Syntax
size Options
size Example
Removing Symbol Table and Relocation Bits with strip
strip Syntax
Using the Archiver to Create Libraries
ar Syntax
ar Options
ar Examples
3. - Using Dynamic Shared Objects
Benefits of Using DSOs
Using DSOs
DSOs vs. Archive Libraries
Using QuickStart
Guidelines for Using Shared Libraries
Choosing Library Members
Tuning Shared Library Code
Taking Advantage of QuickStart
Building DSOs
Creating DSOs
Making DSOs Self-Contained
Controlling Symbols to Be Exported or Loaded
Using DSOs With C++
Using Registry Files
Registry File Format
Directive Lines
Shared Object Specification Lines
Run-Time Linking
Searching for DSOs at Run Time
Run-Time Symbol Resolution
Compiling with -Bsymbolic
Converting Libraries to DSOs
Dynamic Loading Under Program Control
Versioning of DSOs
The Versioning Mechanism
What Is a Version?
Building a Shared Library Using Versioning
Example of Versioning
4. - Using the Performance Tools
Overview of Profiling
Profiling With prof
Running the Profiler
prof Syntax
prof Defaults
prof Options
pc Sampling
Obtaining pc Sampling
Creating Multiple Profile Data Files
pc Sampling Frequency
Examples of Using prof to Obtain pc Sampling Analysis Data
Example Using prof -pcsample
Basic Block Counting
Using pixie
pixie Syntax
pixie Options
Obtaining Basic Block Counts
Examples of Basic Block Counting
Example Using prof -pixie -invocations
Example Using prof -pixie -heavy
Example Using prof -pixie -lines
Example Using prof -pixie -quit
Example Using prof -pixie -procedures
Example Using prof -pixie -procedures -clock
Example Using prof -pixie -dis
Summing Basic Block Count Results From Multiple Runs
Inclusive Basic Block Counting
Syntax
Example of prof -gprof -pixie
Profiling Multiprocessed Executables
Rearranging Procedures With cord
cord Syntax
cord Options
Example Using cord
5. - Optimizing Program Performance
Optimization Overview
Benefits of Optimization
Optimization and Debugging
Using the Optimization Options
Optimization Options
Controlling Floating Point Optimization
-OPT:roundoff=n
-OPT:IEEE_arithmetic=n
Other Options to Control Floating Point Behavior
Debugging Floating-Point Problems
Controlling Miscellaneous Optimizations
Controlling Loop Unrolling
Controlling Global Code Motion
Controlling Software Pipelining
Controlling the Target Architecture
Controlling the Target Environment
Improving Global Optimization
Overview of the Global Optimizer
Optimizing C and Fortran Programs
Optimizing C Programs
Example of Pointer Placement and Aliasing
Improving Other Optimization
C and Fortran Programs
C Programs Only
Register Allocation
6. - Coding for 64-Bit Programs
Coding Assumptions to Avoid
sizeof(int) == sizeof(void *)
sizeof(int) == sizeof(long)
sizeof(long) == 4
sizeof(void *) == 4
Implicitly Declared Functions
Constants With the High-Order Bit Set
Arithmetic with long Types
Solving Porting Problems
Guidelines for Writing Code for 64-Bit Silicon Graphics Platforms
7. - Porting Code to N32 and 64-Bit Silicon Graphics Systems
Compatibility
N32 Porting Guidelines
Porting Environment
Source Code Changes
Build Procedure
Runtime Issues
Porting Code to 64-Bit Silicon Graphics Systems
Using Data Types
Using Predefined Types
Using Typedefs
Using Large Files With XFS
Index

Next | Top | Index